<template>
  <div class="city">
    <city-header />
    <city-list :hotCities="hotCities" :cities="cities"/>
  </div>
</template>

<script>
import CityHeader from './pages/Header'
import CityList from './pages/List'

export default {
  data () {
    return {
      hotCities: [],
      cities: {}
    }
  },
  components: {
    CityHeader,
    CityList
  },
  created () {
    this.$http({
      url: 'static/mock/data/city.json'
    }).then(res => {
      // console.log(res.data.data)
      let data = res.data.data
      this.hotCities = data.hotCities
      this.cities = data.cities
    })
  }
}
</script>

<style scoped lang="stylus">
.city
  background-color: #f5f5f5
  font-size: .28rem
</style>
